<?php
$signup_lbl = BUtils::T('signup_lbl');
$password_lbl = BUtils::T('password_lbl');
$login_facebook_lbl = BUtils::T('login_facebook_lbl');

$this->pageTitle = $signup_lbl;
?>
<div class="section-wrapper post-w">
<div class="container">
<h1 class="section-main-header"><?php echo $signup_lbl; ?></h1>
<div class="row">
	<div class="span5 offset1">
		<div class="white-card extra-padding">
		<a href="javascript:;" class="btn btn-primary btn-large btn-facebook">
			<i class="icon-facebook-sign icon-large"></i>
			<?php echo $login_facebook_lbl; ?>
		</a>
		<hr />
		<div class="login-form row-fluid">
<?php
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'id'=>'signup-form',
	'htmlOptions'=>array('class'=>''),
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
));
echo $form->textFieldRow($model, 'user_input', array('class'=>'span12'));
echo $form->passwordFieldRow($model, 'password', array('class'=>'span12'));
echo $form->passwordFieldRow($model, 'password_repeat', array('class'=>'span12'));
echo "<br /><br />\n";
$this->widget('bootstrap.widgets.TbButton', array('buttonType'=>'submit', 'label'=>$signup_lbl, 'type'=>'info'));
echo CHtml::link('Login', Yii::app()->createUrl('/accounts/login'), array('style'=>'margin-left:14px;'));
$this->endWidget();
$form->errorSummary($model);
?>
		</div>
		</div>
	</div>
	<div class="span5">
		<h3>Don't miss out great offer nearby!</h3>
		<p>Join Yamii to discover special offer around you.</p>
		<p>Yamii keeps it as simple as possible:</p>
		<ul>
			<li>Facebook is the fastest way to register.</li>
			<li>If you don't like to log in with Facebook, you can just use your email or mobile phone number.</li>
		</ul>
		<p>By clicking Sign Up you confirm that you accept our
			<a href="<?php echo Yii::app()->createUrl('/app/privacy') ?>">Privacy Policy</a>
			and <a href="<?php echo Yii::app()->createUrl('/app/terms') ?>">Terms of Use</a>.
		</p>
	</div>
</div>
</div>
<script type="text/javascript">
$(function() {
	$('.btn-facebook').click(function(){
		fbUI.login('<?php echo Yii::app()->createUrl('/accounts/facebook'); ?>');
	});
});
</script>